package edu.gtcfla.km.admin.appmodules.service;

import java.util.Set;

import org.vsg.biz.BusinessOperationException;
import org.vsg.biz.account.Module;
import org.vsg.biz.account.ModuleFunction;
import org.vsg.common.web.json.SelectItem;

import edu.gtcfla.km.admin.appmodules.vo.ModuleEditionVO;
import edu.gtcfla.km.admin.appmodules.vo.ModuleFunctionInModuleVO;
import edu.gtcfla.km.admin.appmodules.vo.ModuleFunctionPermissionVO;
import edu.gtcfla.km.admin.appmodules.vo.ModulePermissionVO;

/**
 * 
 * @author bill Vison
 *
 */
public interface ModuleManagerService {
	
	
	Set<ModuleEditionVO> findAllModules() throws BusinessOperationException;
	
	/**
	 * find show unload modules 
	 * @return
	 * @throws BusinessOperationException
	 */
	Set<ModuleEditionVO> findUnloadedModules() throws BusinessOperationException;
	
	/**
	 * show and list resource action by id
	 * @param moduleResId
	 * @return
	 * @throws BusinessOperationException
	 */
	Set<ModuleFunctionInModuleVO> findFunsByModResId(String moduleResId) throws BusinessOperationException;
	
	
	/**
	 * show all module with permssion
	 * @param roleId
	 * @return
	 * @throws BusinessOperationException
	 */
	Set<ModulePermissionVO> listPermissionModulesByRoleId(String roleId) throws BusinessOperationException;
	
	
	/**
	 * show module function list 
	 * @param module
	 * @return
	 * @throws BusinessOperationException
	 */
	Set<ModuleFunction> findFunctionsByModule(Module module) throws BusinessOperationException;
	

	/**
	 * 
	 * @param roleId
	 * @param permVos
	 * @throws BusinessOperationException
	 */
	void authModule(String roleId , Set<ModulePermissionVO> permVos) throws BusinessOperationException;

	
	/**
	 * 
	 * @param roleId
	 * @param permVos
	 * @throws BusinessOperationException
	 */
	void authModuleWithUnderRes(String roleId , Set<ModulePermissionVO> permVos) throws BusinessOperationException;	


	Set<SelectItem> findAllSelModule() throws BusinessOperationException;

}
